package gl.util

import org.joml.Vector3fc
import org.joml.Vector4fc
import java.nio.ByteBuffer

val ByteBuffer.unsignedInt get() = int.toLong() and 0xFFFFFFFFL

fun ByteBuffer.putVector(vector: Vector3fc) {
    putFloat(vector.x())
    putFloat(vector.y())
    putFloat(vector.z())
}

fun ByteBuffer.putVector(vector: Vector4fc) {
    putFloat(vector.x())
    putFloat(vector.y())
    putFloat(vector.z())
    putFloat(vector.w())
}